
<?php
use yii\helpers\Url;

?>

<a href="<?=Url::to(['news/add'])?>">添加新闻</a>

<div class="news-index">

    <?php
    foreach ($newsList as $item) {
        echo $item['news_title']." ".$item['newImg']." ".$item["news_company"]." ".date("Y-m-d H:i:s",$item['newsTime'])." ".$item['news_content']
            ." ".$item["Report_Mailbox"]." ".$item["like_count"]." ".$item["comment_count"]
            ." ".$item["collect_count"]." ".$item["forward_count"]."<a href=".Url::to(['news/update', 'id' => $item['news_id']]).">"." 修改</a>  
 
      <a href=".Url::to(['news/del', 'id' => $item['news_id']])."> 删除</a>
  
  <br />";
    }
    ?>

</div>